/* 全局样式 */
:root {
    --primary-color: #00ff9d;
    --secondary-color: #0a192f;
    --accent-color: #64ffda;
    --text-color: #e6f1ff;
    --background-color: #0a192f;
    --card-background: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow: hidden;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 80px; /* 为固定导航栏留出空间 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 157, 0.1);
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: #ff4444;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 157, 0.2);
}

/* 用户菜单样式 */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

/* 视频列表页面样式 */
.videos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.videos-filter {
    display: flex;
    gap: 1rem;
}

.videos-filter input,
.videos-filter select {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--text-color);
}

.videos-grid {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    background: var(--background-color);
    position: relative;
    margin: 0;
    padding: 0;
}

.videos-grid::-webkit-scrollbar {
    display: none;
}

.video-card {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    margin: 0;
    padding: 0;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    z-index: 1;
}

.video-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 右侧统计信息 */
.video-card-stats {
    position: absolute;
    right: 1rem;
    bottom: 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: 2;
}

.video-card-stats .author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    margin-bottom: 1rem;
}

.video-card-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.video-card-stats .stat-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-card-stats .stat-item span {
    font-size: 0.8rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 加载动画 */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式布局 */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-card-stats {
        gap: 8px;
        padding: 6px;
    }
    
    .video-card-stats .author-avatar {
        width: 28px;
        height: 28px;
    }
    
    .video-card-stats .stat-item i {
        font-size: 16px;
    }
    
    .video-card-stats .stat-item span {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* 上传页面样式 */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-form {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress {
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* 个人中心页面样式 */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-background);
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.profile-avatar {
    text-align: center;
}

.profile-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    margin-bottom: 1rem;
}

.profile-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.profile-section {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    margin-bottom: 2rem;
}

.profile-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* 评论列表样式 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.comment-author {
    font-weight: 500;
}

.comment-time {
    color: #999;
    font-size: 12px;
}

.comment-content {
    color: #333;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .container {
        padding: 1rem;
        margin-top: 60px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar img {
        width: 100px;
        height: 100px;
    }

    .videos-filter {
        flex-direction: column;
    }

    .upload-form {
        padding: 1rem;
    }

    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
        padding: 12px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
    max-width: 500px;
    width: 90%;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.help-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

/* 状态文本样式 */
.status-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.status-text.success {
    color: var(--primary-color);
}

.status-text.error {
    color: #ff4444;
}

/* 首页视频流样式 */
.video-grid {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    background: var(--background-color);
    position: relative;
    margin: 0;
    padding: 0;
}

.video-grid::-webkit-scrollbar {
    display: none;
}

.video-grid .video-card {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    margin: 0;
    padding: 0;
}

.video-grid .video-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0;
    background: #000;
}

.video-grid .video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.video-grid .video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    z-index: 1;
}

.video-grid .video-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-grid .video-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 首页右侧统计信息 */
.video-grid .video-card-stats {
    position: absolute;
    right: 1rem;
    bottom: 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: 2;
}

.video-grid .video-card-stats .author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    margin-bottom: 1rem;
}

.video-grid .video-card-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.video-grid .video-card-stats .stat-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-grid .video-card-stats .stat-item span {
    font-size: 0.8rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 视频页面样式 */
.video-player-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 宽高比 */
    background: #000;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 视频信息样式 */
.video-info {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
    color: #e0e0e0;
}

.video-info h1 {
    font-size: 1.5rem;
    margin: 0 0 16px;
    color: #fff;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    color: #b0b0b0;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #00a8ff;
}

.video-stats {
    display: flex;
    gap: 16px;
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-description {
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .video-player-container {
        top: 50px;
    }

    .video-info {
        padding: 0 12px;
    }

    .comments-section {
        padding: 0 12px;
    }
}

.comments-section {
    margin-top: 20px;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.comment-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.comment-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background: var(--primary-color);
    color: var(--secondary-color);
    cursor: pointer;
    transition: background 0.3s ease;
}

.comment-form button:hover {
    background: var(--accent-color);
}

.comments-list {
    list-style: none;
}

.comment-item {
    margin-bottom: 10px;
    padding: 10px;
    background: var(--card-background);
    border-radius: 4px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.comment-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.comment-author {
    font-weight: 500;
}

.comment-time {
    color: #999;
    font-size: 12px;
}

.comment-content {
    margin-top: 5px;
    color: var(--text-color);
} 